/** @file         rb_tree_port.c
 *  @brief        简要说明
 *  @details      详细说明
 *  @author       Schips
 *  @date         2020-10-25 09:21:54
 *  @version      v1.0
 *  @copyright    Copyright By Schips, All Rights Reserved
 *
 **********************************************************
 *
 *  @attention    NOTE
#*                SDK: 
#*                ENV: 
 *  @par 修改日志:
 *  <table>
 *  <tr><th>Date       <th>Version   <th>Author    <th>Description
 *  <tr><td>2020-10-25 <td>1.0       <td>Schips    <td>创建初始版本
 *  </table>
 *
 **********************************************************
 */

#include "rb_tree_port.h"
//#define FOR_KERNEL_SPACE

#ifdef FOR_KERNEL_SPACE // 内核开发
POINTER MALLOC(unsigned int size)
{
    return kmalloc(size, GFP_ATOMIC);
}

void FREE(POINTER addr){
    kfree(addr);
}
#else
#ifdef FOR_USER_SPACE // 应用开发
POINTER MALLOC(unsigned int size)
{
    return malloc(size);
}

void FREE(POINTER addr){
    free(addr);
}
#else
#ifdef FOR_CUSTOM // 自定义
POINTER MALLOC(unsigned int size)
{
    return malloc(size);
}

void FREE(POINTER addr){
    free(addr);
}
#endif
#endif
#endif
